import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'

import echarts from './views/charts/echarts.vue'
import Department from "./views/org/Department";
import Employee from "./views/org/Employee";
import Shop from "./views/org/Shop";
import Permission from "./views/auth/Permission";
import Role from "./views/auth/Role";
// import Role2 from "./views/auth/Role2";
import Menu from "./views/auth/Menu";
// import Menu2 from "./views/auth/Menu2";
import ShopRegister from "./views/ShopRegister";
import NoPermission from "./views/403"

import Config from "./views/sys/Config";
import Dictionary from "./views/sys/Dictionary";
import Dictionaryitem from "./views/sys/Dictionaryitem";
import Activetion from "./views/Activetion";
import CarType from "./views/car/CarType";
import Car from "./views/car/Car";

let routes = [
    {
        path: '/',
        component: Home,
        name: 'Charts',
        leaf:true,
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: '首页' }
        ]
    },
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/shopRegister',
        component: ShopRegister,
        name: '',
        hidden: true
    },
    {
        path: '/activation',
        component: Activetion,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/403',
        component: NoPermission,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '组织机构管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Department', component: Department, name: '部门管理' },
            { path: '/Employee', component: Employee, name: '员工管理' },
            { path: '/Shop', component: Shop, name: '商铺管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '权限管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Permission', component: Permission, name: '权限列表' },
            { path: '/Role', component: Role, name: '角色管理' },
            // { path: '/Role2', component: Role2, name: '角色管理2' },
            { path: '/Menu', component: Menu, name: '菜单管理' },
            // { path: '/Menu2', component: Menu2, name: '菜单管理2' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/Config', component: Config, name: '系统配置' },
            { path: '/Dictionary', component: Dictionary, name: '字典管理' },
            { path: '/Dictionaryitem', component: Dictionaryitem, name: '字典信息' }
        ]
    },

    {
        path: '/',
        component: Home,
        name: '车辆管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/carType', component: CarType, name: '车辆类型管理' },
            { path: '/car', component: Car, name: '车辆管理' },

        ]
    },
    //{ path: '/main', component: Main },




    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;